require 'album'
class Artist 
	attr_accessor :name, :albums
	def initialize(name)
		@albums = Hash.new
		@name = name
	end 

	def parse(node)
		@name = node['name']
		node.find(node.path + '/album').each() do |n|
			album = Album.new("")
			album.parse(n)
			@albums[album.name] = album
		end
	end

	def add_album(album)
		@albums.push(album)
	end

	def print()
		puts "interpreter " + @name + "\n"
		@albums.each() do |key, val|
			val.print()
		end
	end
end
